/**  
* <p>Title: ZoneParkingService.java</p >  
* <p>Description: </p >  
* <p>Company:luo.com</p >  
* @author 魏家洛 
* @date 2019年1月25日  
* @version 1.0  
*/  
package com.pmsystem.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.pmsystem.dao.ZoneParkingMapper;
import com.pmsystem.pojo.ZoneParking;

/**  
* <p>Title: ZoneParkingService</p >  
* <p>Description: </p >  
* @author 魏家洛  
* @date 2019年1月25日  
*/
@Service
public class ZoneParkingService{
	@Autowired
	ZoneParkingMapper zoneParkingMapper;

	/**  
	 * <p>Title: getAllParkingArea</p >  
	 * <p>Description:获取所有停车分区信息</p >  
	 * @author 魏家洛
	 * @return    
	 */
	public List<ZoneParking> getAllParkingArea() {
		return zoneParkingMapper.selectAllZoneParking();
	}

	/**  
	 * <p>Title: addZoneParking</p >  
	 * <p>Description:添加停车分区信息</p >  
	 * @author 魏家洛
	 * @param zoneParking
	 * @return  
	 */  
	public boolean addZoneParking(ZoneParking zoneParking) {
		return (zoneParkingMapper.insertZoneParking(zoneParking)!=0);
	}

	/**  
	 * <p>Title: deleteZoneParking</p >  
	 * <p>Description:删除停车场分区信息</p >  
	 * @author 魏家洛
	 * @param zoneParkingId
	 * @return  
	 */  
	public boolean deleteZoneParking(Integer zoneParkingId) {
		return (zoneParkingMapper.deleteZoneParkingById(zoneParkingId)==1);
	}

	/**  
	 * <p>Title: updateZoneParking</p >  
	 * <p>Description:更新停车分区信息</p >  
	 * @author 魏家洛
	 * @param zoneParking
	 * @return  
	 */  
	public boolean updateZoneParking(ZoneParking zoneParking) {
		return (zoneParkingMapper.updateZoneParkingByZoneParking(zoneParking)==1);
	}
}
